#ifndef SERVERWIDGET_H
#define SERVERWIDGET_H
#include <QTcpServer>
#include <QTcpSocket>
#include <QWidget>
#include <QList>
#include <QPoint>
#include <QMouseEvent>
#include <QWidget>
#include <QSqlQuery>

extern int question_id ;
extern int people_que_id ;
extern QString sendt ;

namespace Ui {
class ServerWidget;
}

class ServerWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ServerWidget(QWidget *parent = nullptr);
    ~ServerWidget();
    Ui::ServerWidget *ui;
    QWidget *qa;
    QTcpSocket* socket = nullptr ;

    QTcpServer* server;

    QList<QTcpSocket*>save_socketlist ;

    QSqlDatabase db  ;
    QSqlQuery query;
//    Widget::final_score

private slots:

    void on_ListenBtn_clicked();

    void on_NextBtn_clicked();

    void on_pushbutton_clicked();

    void on_StartBtn_clicked();

    void on_StartBtn_2_clicked();

    void on_SendBtn_clicked();


    void on_EndBtn_3_clicked();


    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_textEdit_3_copyAvailable(bool b);

private:
    int timer1_num=0;

};

#endif // SERVERWIDGET_H
